'''
pip install fastapi
启动可以用Uvicorn or Hypercorn.这里用的uvicorn
pip install "uvicorn[standard]"
启动命令：
uvicorn main:app --reload
其中--reload ：可以自动重启

hypercorn main:app --bind 0.0.0.0:8080# Uvicorn
http://127.0.0.1:8080/docs
uvicorn myapp:app --host 0.0.0.0 --port 8080

https://github.com/pgjones/hypercorn
hypercorn myapp:app --bind "0.0.0.0:5000" --bind "[::]:5000"
'''

from fastapi import FastAPI
import uvicorn

app = FastAPI()


if __name__ == '__main__':
    # uvicorn.run(app)
    # uvicorn.run(app='main:app', host="127.0.0.1", port=8000, reload=True, debug=True)
    uvicorn.run(app='main:app', host="127.0.0.1", port=8000, reload=True)
